﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Portal.Ef
{
    public class EntitiesFactory
    {
        public static Type EntitiesKey = typeof(int);
        public static Entities Entities()
        {
            return new Entities();
            var enntities = System.Web.HttpContext.Current.Items[EntitiesKey] as Entities;
            if (enntities == null)
            {
                enntities = new Entities();
                System.Web.HttpContext.Current.Items[EntitiesKey] = enntities;
            }
            return enntities;
        }

    }
}
